<!-- <template>
    <color></color>
</template>
<script setup lang="ts">
import color from "../../packages/components/colorPicker/index" 
</script>
<style scoped>
</style> -->
<script setup lang="ts">
import BlockBox from '../BlockBox.vue';
import { ref } from "vue"
import Color from "../../packages/components/colorPicker/index";
let colorp = ref({
    r: 70,
    g: 70,
    b: 70,
    a: 0.3
})
function getRandomNum_ab(min: number, max: number) {
    const num = Math.random() * (max - min - 1) + (min + 1);
    const randomNum = Math.floor(num);
    return randomNum;
}
const aa = () => {
    colorp.value = {
        r: getRandomNum_ab(0, 255),
        g: getRandomNum_ab(0, 255),
        b: getRandomNum_ab(0, 255),
        a: 0.3
    }
}
</script>

<template>
    <!-- <BlockBox text="颜色选择"> -->
    <button @click="aa">anniu</button>
    <div style="width: 310px; margin-left: 1px;">
        <Color :color="colorp"></Color>
    </div>
    <!-- </BlockBox> -->
</template>
